/*
 * Copyright© 2003-2019 浙江汇信科技有限公司, All Rights Reserved. 
 */
package com.icinfo.cloud.provider.punish.csource.manage.controller;

import com.icinfo.cloud.provider.punish.csource.manage.dto.CaseSourceRegisterMainInfoDto;
import com.icinfo.cloud.provider.punish.csource.manage.dto.FlowRecordDto;
import com.icinfo.cloud.provider.punish.csource.manage.dto.FlowRecordVo;
import com.icinfo.cloud.provider.punish.csource.manage.service.ICaseSourceFlowRecordService;
import com.icinfo.framework.common.web.Result;
import com.icinfo.framework.core.web.BaseController;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 描述: 案源登记流程记录表 case_source_flow_record 对应的Controller类.<br>
 *
 * @author framework generator
 * @date 2022年08月12日
 */
@RestController
@RequestMapping("/punish/csource/flowrecord")
public class CaseSourceFlowRecordController extends BaseController {
    /**
     * 日志记录器
     */
    private static final Logger logger = LoggerFactory.getLogger(CaseSourceFlowRecordController.class);

    @Autowired
    private ICaseSourceFlowRecordService caseSourceFlowRecordService;
    /**
     * 查询流转日志
     * @author liyafeng
     * @date 2022/8/15
      * @param flowRecordDto
     * @return {@link Result< List< FlowRecordVo>>}
     */
    @PostMapping(value = "/getFlowRecord")
    @ResponseBody
    public Result<List<FlowRecordVo>> getFlowRecord(@RequestBody @Validated FlowRecordDto flowRecordDto) {
        List<FlowRecordVo> flowRecordVos=caseSourceFlowRecordService.getFlowRecordList(flowRecordDto);
        return Result.success(flowRecordVos);
    }
}